package com.easybeanfit.UUService.config;

import com.easybeanfit.UUService.commutill.UUStrUtil;

/**
 * Created by Andy on 2016/6/16.
 * 申请联盟下一个状态
 */

public enum EnumShopNextStatus {
    REAPPLY_CANCEL("-2","取消申请联盟"),
    REAPPLY_REFUSE("-1","取消申请联盟"),
    APPLY("0","取消申请联盟"),
    UNION_CANCEL("1","申请联盟"),
    APPLY_CANCEL("2","申请联盟"),
    AGREE_APPLY("3","取消联盟"),//同意联盟
    UNION_REFUSE("4","申请联盟");//拒绝联盟

    EnumShopNextStatus(String status, String des) {
        this.status = status;
        this.des = des;
    }

    private String status;

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    private String des;

    public static String getDescByCode(String status) {
        if (!UUStrUtil.isEmpty(status)) {
            for (EnumShopNextStatus e : EnumShopNextStatus.values()) {
                if (e.getStatus() == status) {
                    return e.getDes();
                }
            }
        }
        return "";
    }
}
